window.addEventListener("load", () => {
  class Index {
    constructor() {
      this.flag=0;
      this.a=document.querySelectorAll("a")
      this.init();
      this.bindevent();
    }
    init() {
      this.uname=location.hash.split("=")[1]
      if(this.uname!=undefined){
        $("#wd").html(this.uname)
        $("#wdd").css("display","none")
        $("#exit").css("display", "block");
        this.flag=1;
      }
       
    }
    bindevent() {
      $("#exit").on("click", () => {
        location.href="../dist/index.html"
      });
      $("#account").on("click", () => {
        if(this.flag=1){
              location.href="../dist/account.html"
        }else{
              location.href="../dist/login.html"
        }
      });
      // .on("click",()=>{
        
      // })
      
    }

    
  }
  new Index();
});
